package com.yaozheng.vocationaltraining.app;

import com.yaozheng.vocationaltraining.R;
import com.yaozheng.vocationaltraining.utils.ControlsUtils;
import com.yaozheng.vocationaltraining.utils.LogUtils;

import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.DisplayMetrics;
import android.view.WindowManager;

import org.androidannotations.annotations.EApplication;

import cn.jpush.android.api.JPushInterface;

@EApplication
public class VocationalTrainingApplication extends Application {
    private String equip;

    @Override
    public void onCreate() {
        super.onCreate();
        DisplayMetrics metric = new DisplayMetrics();
        WindowManager mWindowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
        mWindowManager.getDefaultDisplay().getMetrics(metric);
        int width = metric.widthPixels; // 屏幕宽度（像素）
        int height = metric.heightPixels; // 屏幕宽度（像素）
        equip = android.os.Build.MODEL + ",android" + android.os.Build.VERSION.RELEASE + "," + height + "x" + width;

        JPushInterface.setDebugMode(false);    // 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);            // 初始化 JPush
//        JPushInterface.resumePush(this);

//        String rid = JPushInterface.getRegistrationID(getApplicationContext());
//        LogUtils.println(rid);
    }


    public String getEquip() {
        return equip;
    }
}
